public function store(Request $request)
{
$this->validate($request, [
'new_house_id' => 'required|integer',
'is_thinking' => 'required|numeric|max:32',
'around_score' => 'required|numeric|in:0,1,2,3,4,5',
'traffic_score' => 'required|numeric|in:0,1,2,3,4,5',
'green_score' => 'required|numeric|in:0,1,2,3,4,5',
'desc' => 'required|numeric|min:6|max:255'
], [], [
'new_house_id' => '新房',
'is_thinking' => '是否考虑',
'around_score' => '周边配套',
'traffic_score' => '交通方便',
'green_score' => '绿化环境',
'desc' => '点评'
]);
$comment = $this->commentRepository->store($request->all());
return response()->json(['msg' => '添加评论成功,审核成功后才会显示哦~']);
}